{%extends 'base.html'%}

{% block css %}

<style type="text/css">
    .table_detail {

        margin: 20px;

    }

    .link {

        text-align: center;

        margin-top: 40px;
    }
</style>
{% endblock %}

{% block body %}

<div class="center">
    {% if result_info %}
        {% if result_info.party == 'A' %}

        <h1>{{result_info.company_name}}需求页面</h1>
        {% else %}
        <h1>{{result_info.company_name}}资源页面</h1>

        {% endif %}

    {% else %}
    <h1>没有这个ID!!!</h1>
    {% endif %}
</div>

<hr>

<div class="table_detail">

    <table class="table table-striped">



        <tr>
            <th>公司性质</th>
            {% if result_info.party == 'A'%}
            <td>甲方</td>
            {% elif result_info.party == 'B'%}
            <td>乙方</td>
            {% endif %}


        </tr>

        <tr>
            <th>公司名称</th>
            <td>{{result_info.company_id|company_id_to_name}}</td>
        </tr>

        <tr>
            <th>联系人</th>
            <td>{{result_info.company_id|company_id_to_linkman}}</td>
        </tr>

        <tr>
            <th>需求</th>
            <td>{{result_info.need}}</td>
        </tr>

        <tr>
            <th>发布时间</th>
            <td >{{result_info.regedate}}</td>
        </tr>

        <tr>
            <th>联系电话</th>
            {% if result_pay%}
            <td id="contents">{{result_info.company_id|company_id_to_phone}}</td>
            {% else %}
            <td id="contents">{{result_info.company_id|company_id_to_phone|phone_notify}}</td>
            {% endif %}
        </tr>

       



    </table>

</div>

<div class="container">
    <div class="row">
        <div class="col-xs-1 col-sm-2 col-md-3"></div>

        <div class="col-xs-10 col-sm-8 col-md-6" style="text-align: center;">
            {% if company_state == 0 %}

            <a href="/post_phone" class="btn btn-primary btn-lg active" role="button">注册可免费获得本信息电话</a>

            {% elif result_pay == 1 %}
            
            <a href="#" class="btn btn-primary btn-lg active" role="button" disabled="disabled">点我复制电话</a>

            {% elif company_state == 1 %}

            <a href="/jsapi" class="btn btn-primary btn-lg active" role="button">获取本条信息只需1元</a>

            

            {% endif %}
        </div>

        <div class="col-xs-1 col-sm-2 col-md-3"></div>
    </div>
</div>









{% endblock %}



{% block script %}
<script type="text/javascript"> 
    document.getElementById("demo").innerHTML = "详情";


    function jsCopy() {
        var e = document.getElementById("contents");//对象是contents 
        e.select(); //选择对象 （全选）
        document.execCommand("Copy"); //执行浏览器复制命令
    }



</script>
{% endblock %}